package org.aiforum.backend.controller;

import org.aiforum.backend.common.Response;
import org.aiforum.backend.service.VerificationCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 验证码控制器
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/verification")
public class VerificationCodeController {
   
	@Autowired
	private  VerificationCodeService verificationCodeService;
	
	@RequestMapping("/getCode")
	@ResponseBody
	public Response getVerifictionCode(){
		Response response=verificationCodeService.getVerificationCode(34, 100);
		return response;
	}
    
	@RequestMapping("/checkCode")
	@ResponseBody
	public Response checkVerificationCode(String code){
		Response response=verificationCodeService.checkVerificaionCode(code);
		return response;
	}
}
